home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr48
/
pcl4p33.zip
/
HEX_IO.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-04-26
|
834b
|
34 lines
(*********************************************)
(* *)
(* This program is donated to the Public *)
(* Domain by MarshallSoft Computing, Inc. *)
(* It is provided as an example of the use *)
(* of the Personal Communications Library. *)
(* *)
(*********************************************)
unit hex_io;
interface
Procedure WriteHexByte(Data:Byte);
Procedure WriteHexWord(Data:Word);
implementation
uses PCL4P, crt;
Procedure WriteHexByte(Data:Byte);
const HexChars: array[0..15] of char = '0123456789ABCDEF';
begin
write( HexChars[Data SHR 4] );
write( HexChars[Data AND $0F] );
end;
Procedure WriteHexWord(Data:Word);
begin
WriteHexByte(Data SHR 8);
WriteHexByte(Data AND $00FF)
end;
end.